// 示例：获取所有消息类型
fetch('/api/message-types')
    .then(response => response.json())
    .then(data => {
        const table = document.getElementById('typeTable');
        data.forEach(type => {
            const row = table.insertRow();
            row.innerHTML = `
                <td>${type.id}</td>
                <td>${type.typeName}</td>
                <td>${type.status === 1 ? '启用' : '禁用'}</td>
            `;
        });
    });